package pub.wkq.auth.config;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.retry.annotation.EnableRetry;
import org.springframework.scheduling.annotation.EnableAsync;

@EnableAsync //激活异步
@EnableRetry //激活重试
@SpringBootApplication
@EnableDiscoveryClient //激活服务发现客户端
@ComponentScan(basePackages = {"pub.wkq"})
@MapperScan(basePackages = {"pub.wkq.auth.mapper"})
@EnableFeignClients(basePackages = {"pub.wkq.api.feign"})
public class AuthApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(AuthApplication.class, args);
        String property = applicationContext.getEnvironment().getProperty("spring.rabbitmq.host");
        System.out.println("property = " + property);

    }
}
